1. Field of the Invention
The present invention generally relates to a coding apparatus and a coding method. More particularly, the invention relates to a coding apparatus and a coding method, both in which a code string having a changed compression ratio can be regenerated merely by requantizing signal components with less calculations and a simple construction at a high speed without needing to perform dequantizing and quantizing operations once again.
2. Description of the Related Art
Various types of high-efficiency audio-signal (including sound signals) coding methods are available. For example, a non-block-type frequency band division method, which is referred to as "the band-division coding method" (the sub-band coding (SBC) method), is employed. In this method, a time-base audio signal is divided into signal components in a plurality of frequency bands without being grouped into a plurality of blocks, and the divided signal components are then coded. A block-type frequency band division method, which is referred to as "a transform coding method", is also available. In this method, a time-based signal is transformed (spectrum-transformed) into a frequency-based signal, and the transformed signal is divided into signal components in a plurality of frequency bands. Then, the divided signal components are coded in the respective frequency bands. Further, a high-efficiency coding technique with a combination of the above-described sub-band coding method and transform coding method may be considered. In this technique, for example, a signal is first divided into signal components in a plurality of bands according to the sub-band coding method. The divided signal components in the bands are spectrum-transformed into frequency-based signal components, respectively, which are then coded according to the transform coding method.
As a filter used in the foregoing sub-band coding method, a quadrature mirror filter (QMF), for example, may be used. An example of the use of this filter is described in 1976 R. E. Crochiere Digital coding of speech in subbands, Bell Syst.Tech. J. Vol.55, No.8 1976. Also, an equal-bandwidth-filter division method is stated in ICASSP 83,BOSTON Polyphase Quadrature filters--A new subband coding technique, Joseph H. Rothweiler.
As the foregoing spectrum-transform coding method, the following technique of transforming a time-base signal into a frequency-base signal is available. An input audio signal is first grouped into blocks with a predetermined time unit (frame), and then, discrete Fourier transform (DFT), discrete cosine transform (DCT), or modified DCT (MDCT) are performed on the respective blocks of signal components. The MDCT operation is described in detail in ICASSP 1987 Subband/Transform Coding Using Filter Bank Designs Based on Time Domain Aliasing Cancellation, J. P. Princen A. B. Bradley Univ. of Surrey Royal Melbourne Inst.of Tech.
The signal which is divided into signal components in a plurality of bands by using a filter or by performing a spectrum-transform operation, as noted above, is quantized. Consequently, the bands in which quantizing noise is generated can be suppressed. By virtue of the masking effect, an aurally higher-efficiency coding operation can be performed. The coding operation can be performed with even higher efficiency if the signal components in each band are normalized by dividing them by the maximum of the absolute values of the signal components before the signal components are quantized.
The bandwidths in the sub-band coding method for quantizing an audio signal are determined in consideration of certain characteristics, such as human aural characteristics. For instance, an audio signal is divided into a plurality of (for example, 25) bands in such a manner that the bandwidth increases in a higher-frequency band, i.e., in a band closer to the critical band. Then, when data in each band is coded, a predetermined number of bits are distributed to each band, or a suitable number of bits are allocated to each band (bit allocation). For example, when the MDCT-processed coefficient data is coded by the above bit allocation, the MDCT coefficient data in each band is coded with a suitably allocated number of bits. As this bit allocation method, the following two techniques are known.
One technique is disclosed in Adaptive Transform Coding of Speech Signals, R. Zelinski and P. Noll, IEEE Transactions of Acoustics, Speech, and Signal Processing, vol. ASSP-25, No.4, August 1977. In this technique, bit allocation is conducted in accordance with the magnitudes of the signal components in the respective bands. This technique makes it possible to smooth the quantizing noise spectrum and to minimize the noise energy, but on the other hand, the actual acoustic noise is not optimally suppressed due to the absence of the masking effect.
The other technique is disclosed in ICASSP 1980, The critical band coder--digital encoding of the perceptual requirements of the auditory system, M. A. Kransner MIT. In this technique, aural masking is utilized to obtain a signal-to-noise ratio (S/N ratio) required for each band, thereby performing fixed bit allocation. In this technique, however, bit allocation is fixed on any block of signal components even when a sine-wave signal is input, thus failing to obtain very good characteristics.
In order to solve the foregoing problems, the following type of high-efficiency coding apparatus has been proposed. All the bits to be allocated are divided into fixed bits that are predetermined for the individual small blocks, and variable bits that are determined according to the magnitudes of respective blocks of signal components. The dividing ratio is determined by the type of input signal, and the ratio of the fixed-bit allocation is greater as the signal spectrum becomes smoother.
According to the above technique, a greater number of bits can be allocated to blocks including a spectrum having a greater amount of energy, such as a sine-wave signal, thereby significantly improving the overall S/N ratio. Since humans are, in general, highly sensitive to signals having sharp spectrum components, an improvement in the S/N ratio by employing this technique is effective not only for improving the measurements of the characteristics, but also for enhancing the acoustic sound quality.
In addition to the foregoing two techniques, a variety of techniques have been proposed for the bit allocation method. If the precision of an audio-related model is further increase, the performance of a coding apparatus is improved, thereby enabling an audio coding operation with even higher efficiency.
The following coding method has been previously proposed in PCT-published application No. WO94/28633 by the present inventor. Tones which are particularly important from an aural sense are separated from a spectrum signal and are coded independently of the other spectrum components. It is thus possible to efficiently code audio signals with a high compression ratio substantially without degrading the quality of audio signals.
If a DFT or DCT operation is employed to transform a waveform signal of a predetermined time block consisting of M number of samples into a spectrum signal, M number of independent items of real-number data are obtained. In order to reduce connection distortion between time blocks, each block is generally overlapped with adjacent blocks on both sides, each by an amount equal to M1 number of samples. Accordingly, in a DFT or DCT operation, on the average, M number of items of real-number data are quantized and coded in relation to (M-M1) number of samples.
In contrast, if an MDCT operation is employed to transform a waveform signal into a spectrum signal, M number of independent items of real-number data can be obtained from 2M number of samples in which each block is overlapped with adjacent blocks on both sides, each by an amount equal to M number of samples. Thus, in an MDCT operation, on the average, M number of items of real-number of data are quantized and coded in relation to M number of samples.
In a decoding apparatus, the coded data obtained by performing an MDCT operation is inverse-transformed in the respective blocks into waveform elements, which are then added while interfering with each other, thereby reconstructing a waveform signal.
The resolving power of the frequency spectrum can be generally elevated by increasing the length of a time block used for signal transform, thereby making the energy concentrate on specific spectrum components. Accordingly, a block is overlapped with adjacent blocks on both sides, each by an amount equal to half of the block, and the, a waveform signal is transformed with an increased block length. Moreover, a coding operation an be executed with even higher efficiency by using MDCT than by using DFT or DCT because the number of items of spectrum data is the same as the number of original time samples. Additionally, adjacent blocks are overlapped with each other by a considerable amount, thereby reducing inter-block distortion of the waveform signal.
In order to construct a code string, a quantizing-accuracy information and normalizing-coefficient information, which are input together with the quantized and normalized signal, are first coded with a predetermined number of bits in each band of the signal, and the normalized and quantized spectrum signal is then coded.
For coding spectrum signals, a method using variable-length codes, such as Huffman codes, is known. Huffman codes are stated in, for example, David A. Huffman, A Method for the Construction of Minimum--Redundancy Codes, Proceedings of the I.R. E., pp.1098-1101, September 1952.
A coded string which has been generated in the above manner may sometimes be regenerated into a new code string by changing the compression ratio in response to a change in the capacity of the transmitting channel of a transmitting medium. The operation is generally performed in the following procedure. The original code string is temporarily resolved to decode signal components for adjusting the number of bits, and then, not only the frequency bands are restricted, but also a bit reallocation is made and quantizing accuracy and normalizing coefficients are changed. Subsequently, the signal is requantized to create a new code string.
FIG. 9 is a block diagram illustrating an example of a conventional circuit for changing the compression ratio of a previously generated code string. In this example, data coded by the coding apparatus is input into a signal-component decoding circuit 111. The decoding circuit 111 decodes (dequantizes) the input codes and outputs the decoded data to an inverse-transform circuit 112. The inverse-transform circuit 112 spectrum-inverse-transforms the codes corresponding to the input spectrum components into time-based codes and outputs the original data. The data is then retransformed into a spectrum signal by a transform circuit 113, and the spectrum signal is supplied to a normalizing circuit 114 and a quantizing-accuracy determining circuit 115.
The quantizing-accuracy determining circuit 115 determines the quantizing accuracy for the input spectrum signal and outputs the determined quantizing-accuracy information to a quantizing circuit 116. In the meantime, the normalizing circuit 114 normalizes the input spectrum-signal components and outputs the normalized data to the quantizing circuit 116. The quantizing circuit 116 then quantizes the normalized data input from the normalizing circuit 114 with the quantizing accuracy input from the quantizing-accuracy determining circuit 115.
The signal components RS (real number) obtained by dequantizing the original codes by the signal-component decoding circuit 111 are calculated according to the following equation in relation to the original normalizing coefficient SF(i) (integer), the original quantizing accuracy MQ(i) (integer), and the original quantized signal components (input signal) QS (integer). EQU RS=SF(i)*QS/(MQ(i)+0.5) (1)
Each factor is a constant determined by each unit i.
The signal components QS' (integer) obtained by requantizing the original input signal QS by the quantizing circuit 116 are calculated according to the following equation in relation to the normalizing coefficient SF'(i) (integer) determined by the normalizing circuit 114, the quantizing accuracy MQ'(i) (integer) determined by the quantizing-accuracy determining circuit 115, and the dequantized signal components (input signal) RS (real number). EQU QS'=RS/SF'(i)*(MQ'(i)+0.5) (2)
According to the foregoing known method, in order to regenerate a code string by changing the compression ratio of the original code string output from the coding apparatus, it is necessary to perform calculations by an amount substantially equal to the calculations required for decoding and recoding the original input signal. Thus, this method is not suitable for the type of processing which should be executed at high speed, for example, real-time processing for changing the compression ratio. Additionally, the calculated values of real numbers which are frequently used during processing must be stored, thereby increasing the size of the hardware.